package com.kolalo.annotation.qualifier.movie;

import com.kolalo.annotation.qualifier.QualifierAnnotation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MovieRecommender {

    @Autowired
    @MovieQualifier(format = Format.VHS, genre = "Action")
    private MovieCatalog actionVhsCatalog;

    @Autowired
    @MovieQualifier(format = Format.VHS, genre = "Comedy")
    private MovieCatalog comedyVhsCatalog;

    @Autowired
    @MovieQualifier(format = Format.DVD, genre = "Action")
    private MovieCatalog actionDvdCatalog;

    public MovieCatalog getActionVhsCatalog() {
        return actionVhsCatalog;
    }

    public void setActionVhsCatalog(MovieCatalog actionVhsCatalog) {
        this.actionVhsCatalog = actionVhsCatalog;
    }

    public MovieCatalog getComedyVhsCatalog() {
        return comedyVhsCatalog;
    }

    public void setComedyVhsCatalog(MovieCatalog comedyVhsCatalog) {
        this.comedyVhsCatalog = comedyVhsCatalog;
    }

    public MovieCatalog getActionDvdCatalog() {
        return actionDvdCatalog;
    }

    public void setActionDvdCatalog(MovieCatalog actionDvdCatalog) {
        this.actionDvdCatalog = actionDvdCatalog;
    }

    public MovieCatalog getComedyBluRayCatalog() {
        return comedyBluRayCatalog;
    }

    public void setComedyBluRayCatalog(MovieCatalog comedyBluRayCatalog) {
        this.comedyBluRayCatalog = comedyBluRayCatalog;
    }

    @Autowired
    @MovieQualifier(format = Format.BLURAY, genre = "Comedy")
    private MovieCatalog comedyBluRayCatalog;

    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("MovieRecommender.xml");
        MovieRecommender movie=context.getBean(MovieRecommender.class);
    }
}
